package boss.portal.controller;

import boss.portal.common.ResponseData;
import boss.portal.service.impl.pro.PlatformCollectService;
import boss.portal.service.impl.pro.PublicCollectServiceImpl;
import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 平台采集
 */
@Api(description = "产品采集", value = "产品采集")
@RestController
@RequestMapping("/platgorm/collect")
public class PlatformCollectController extends BaseController{

    @Autowired
    private PlatformCollectService platformCollectService;

    @Autowired
    private PublicCollectServiceImpl publicCollectService;


    @PostMapping("/link")
    @ApiOperation("链接采集")
    public ResponseData dataCollect(@RequestParam(value = "link",required = true)String link){
        publicCollectService.addData();
        return success("采集成功！");
    }

}
